package com.smartfast4j.springboot.mybatis.demo.service.impl;

import com.smartfast4j.springboot.mybatis.demo.dao.LearnResourceMapper;
import com.smartfast4j.springboot.mybatis.demo.pojo.LearnResource;
import com.smartfast4j.springboot.mybatis.demo.pojo.LearnResourceExample;
import com.smartfast4j.springboot.mybatis.demo.service.LearnResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by gacl on 2017/11/20.
 */
@Service
public class LearnResourceServiceImpl implements LearnResourceService {

    @Autowired
    private LearnResourceMapper learnResourceMapper;

    @Override
    public int countByExample(LearnResourceExample example) {
        return learnResourceMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(LearnResourceExample example) {
        return learnResourceMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return learnResourceMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(LearnResource record) {
        return learnResourceMapper.insertSelective(record);
    }

    @Override
    public List<LearnResource> selectByExample(LearnResourceExample example) {
        return learnResourceMapper.selectByExample(example);
    }

    @Override
    public LearnResource selectByPrimaryKey(Long id) {
        return learnResourceMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(LearnResource record, LearnResourceExample example) {
        return learnResourceMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(LearnResource record) {
        return learnResourceMapper.updateByPrimaryKeySelective(record);
    }
}
